﻿@model IEnumerable<Fcom.VNInsurance.Web.Models.ProductCatLang>
@{
    var productLangs = (Dictionary<int, IEnumerable<Fcom.VNInsurance.Web.Models.ProductLang>>)ViewBag.LangProducts;
}
<ul id="menu">
         @foreach (var nav in Model)
     { 
			<li id="menu-@nav.ProductCat.CatName.ToLower()"  onmouseover="this.style.backgroundColor='#@nav.ProductCat.CatColor';this.style.color='#fff'"
   onmouseout="this.style.backgroundColor='transparent';this.style.color='inherit'"><a href="#">@nav.DisplayName</a>
                  @{var plangs = productLangs[nav.CatID];}
        @if (plangs.Count() > 0)
        {
             <ul style="background:#@nav.ProductCat.CatColor">
                    @foreach(var pl in plangs)
                { <li>
                        <span class="@Request.Cookies["_culture"]["lang"]comparebtn">Compare</span>
                        <div class="menuitem3" style="position:relative">
                        <a class="menuitem3-link" href="@(pl.Product.toOtherlink ? pl.Product.Ortherlink : Url.Action(pl.Product.Action, pl.Product.Controller) ) " target="@(pl.Product.toOtherlink ? "_blank" :"")" title="@pl.SmallIntro">
                            
                            <div class="menuitem-content">
                                <div class="menuitem-image">
                                    <img src="@Url.Content("~/Content/images/ProductIcons/"+pl.Product.ProductIcon)"/>
                                </div>
                                <div class="menuitem-description"> 
                                    <span class="menutiem-name">@pl.DisplayName</span>
                               <p>@pl.SmallIntro</p>
                                
                                </div>
                               <div style="clear:both"></div>
                              
                            </div>
                             
                        </a>
                        </div>
                    </li>
                    }
               </ul>
        }
        </li>
     }

</ul>